package yazan.com.pdacollector_android.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import butterknife.ButterKnife;
import butterknife.OnClick;
import yazan.com.pdacollector_android.R;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

//    @Override
//    public boolean dispatchKeyEvent(KeyEvent event) {
//        switch (event.getKeyCode()) {
//            case KeyEvent.KEYCODE_BACK:
//                return false;
//        }
//        return true;
//    }

    @OnClick({R.id.buttonValidation, R.id.buttonBrowse})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.buttonValidation: {
                Intent intent = new Intent(this, OrderDetailActivity.class);
                startActivity(intent);
            }
            break;
            case R.id.buttonBrowse: {
                Intent intent = new Intent(this, OrderBrowserActivity.class);
                startActivity(intent);
            }
            break;
        }
    }
}
